<template>
  <header>
    <cov-button class="sidebar-btn btn">
      <a @click="showMenu = !showMenu">
        <i class="iconfont">&#xe601;</i>
      </a>
    </cov-button>
    <!--title-->
    <h4><slot></slot></h4>
    <!--搜索-->
    <a class="search-btn btn" v-link="{path:'/search'}">
      <i class="iconfont">&#xe600;</i>
    </a>
  </header>
</template>
<script>
  var btn = require("../../components/public/btn.vue");
  export default{
    data(){
      return {}
    },
    props:["show-menu"],
    components:{
      covButton:btn
    }
  }
</script>
<style scoped>
  header{
    width:100%;
    height:0.8rem;
    box-sizing:border-box;
    border-bottom:1px solid #f0f0f0;
    display:table;
    content:'';
    text-align:center;
    box-shadow: 0 1px 4px #eeeeee;
  }
  header>h4,
  header .btn{
    line-height:0.8rem;
    color:#3d464d;
  }
  /*标题*/
  header>h4{
    display:inline-block;
    width:50%;
    margin:0 auto;
    text-align:center;
    font-size:0.3rem;
  }
  /*按钮*/
  header .btn{
    display:block;
    width:0.8rem;
    height:0.8rem;
    color:#2C3030;
    font-weight:500;
    box-sizing:border-box;
  }
  header .btn:active{
    color:#55bef9;
  }
  header .btn i{
    font-size:0.4rem;
  }
  header .sidebar-btn{
    float:left;
    text-align:left;
    padding-left:0.2rem;
  }
  header .search-btn{
    float:right;
    text-align:right;
    padding-right:0.2rem;
  }
</style>
